package com.xiaocg.observer;

public class ObserverTest {
    public static void main(String[] args) {
        Subject subject = new SubscriptSubject();
        Observer observer1 = new UserObserver("1");
        Observer observer2 = new UserObserver("2");
        Observer observer3 = new UserObserver("3");
        subject.attach(observer1);
        subject.attach(observer2);
        subject.attach(observer3);

        subject.notify("ddddddd");



    }
}
